Skip to content

feat(neovim/ask): make provider endpoint and model configurable#397

Draft
etrobert-bot wants to merge 1 commit into
mainfrom
ask-configurable-provider
Draft

feat(neovim/ask): make provider endpoint and model configurable#397
etrobert-bot wants to merge 1 commit into
mainfrom
ask-configurable-provider

Conversation

@etrobert-bot

Copy link
Copy Markdown
Collaborator

Makes the :Ask neovim plugin provider-agnostic: the endpoint and model are now read from ASK_BASE_URL and ASK_MODEL (defaults unchanged: OpenAI + gpt-4.1), so it can target any OpenAI-compatible API — e.g. ollama (http://localhost:11434/v1) or the copilot-api proxy already running on tower (http://localhost:4141/v1).

  • ASK_BASE_URL — base URL of an OpenAI-compatible API (/chat/completions is appended)
  • ASK_MODEL — model name sent to the API
  • The Authorization header is omitted when OPENAI_API_KEY is unset, and the missing-key error now only fires for the default OpenAI endpoint (local providers need no key)

Verification

Built .#neovim-wrapped from this branch and drove :Ask headlessly against a local mock server streaming OpenAI-style SSE chunks with ASK_BASE_URL=http://127.0.0.1:8765/v1 ASK_MODEL=test-model and no API key — the response buffer received the streamed text (Hello from mock model test-model). Also verified the missing-key error still triggers when neither ASK_BASE_URL nor OPENAI_API_KEY is set.

🤖 Generated with Claude Code

Read ASK_BASE_URL and ASK_MODEL from the environment so :Ask can target
any OpenAI-compatible API (ollama, copilot-api, etc.) instead of only
OpenAI. The Authorization header is omitted when no key is set, and the
missing-key error now only fires for the default OpenAI endpoint.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant